<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<title>My JSP 'tree1.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<sx:head />
		<script type="text/javascript">
            //为节点添加选中事件
            dojo.event.topic.subscribe("nodeSelected",function(source){
            	alert(source.node.title);
            });
        </script>
	</head>

	<body>
		<sx:tree rootNode="root" nodeTitleProperty="title"
			nodeIdProperty="id" childCollectionProperty="childs" selectedNotifyTopics="nodeSelected"></sx:tree>
	</body>
</html>
